<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link href="./styles/general.css" rel="stylesheet" type="text/css" />
<link href="./styles/main.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="../images/jquery.js"></script>
<script type="text/javascript" src="../images/unti.js"></script>
<title></title>
<script type="text/javascript">
	function delproduct(store_id)
	{   
		if(window.confirm('是否要删除本条分类信息，删除后无法恢复！'))
		{
			$.get("/wondershare/store.php?action=DeleteStore", { store_id: store_id},
            function(data){
                   if(data == 'success')
				   {
				     $("#store_"+store_id).remove();

				   }else
				   {
				      alert("由于系统原因，不能删除，请联系管理员！");
				   }
	
		    });
		}
		else
		{
			return false;
		}
	}
	function store_link_product(url)
	{
		jIframe('', '所有产品列表', {
				width: 750,
				height: 445,
				src: url,
				ID: 'all_product'
			});
	}
	
	function addnewstore(url)
	{
		location.href=url;
	}
</script>
<style>
table tr td{ text-align:center;}
</style>
</head>
<body>
<h1>
<span class="action-span">
<a href="./store.php?action=AddNewStore">添加分类</a>
</span>
<span class="action-span1">
<a href="i#">store栏目管理</a>
</span>
<div style="clear:both"></div>
</h1>

<form style="margin-top:10px;" method="POST" action="./store.php?action=SearchStore ">
  <img height="22" border="0" width="26" alt="SEARCH" src="../images/icon_search.gif">  
   <select name="search_type"><option value="1">分类名称</option><option value="2">分类备注</option></select>
  关键字 <input type="text" size="25" name="search_key"><input type="submit" class="button"  name="search" value=" 搜索 ">
</form>


<form style="margin-top:20px;">
  <{if count($storelist)<=0}>
  <h2 style="text-align:center;">没有数据</h2>
  <{else}>
  <table width="100%" cellspacing="1" cellpadding="2" id="list-table" class="list-div">
    <tr>
      <th width="5%">分类ID</th>
      <th width="15%">分类名称</th>
      <th width="30%">分类备注</th>
      <th width="15%">操作人员</th>
      <th width="15%">操作时间</th>
      <th width="30%">操作</th>
    </tr>
    <{foreach from=$storelist key=myID item=store}>
    <tr id="store_<{$store.store_cat_id}>">
      <td width="5%"><{$store.store_cat_id}></td>
      <td width="15%"><{$store.store_cat_name}></td>
      <td width="30%"><{$store.store_cat_remark}></td>
      <td width="15%"><{$store.operater}></td>
      <td width="15%"><{$store.operate_time}></td>
      <td width="30%"><a href="./store.php?action=StoreDetail&store_id=<{$store.store_cat_id}>">详情</a>&nbsp;&nbsp;&nbsp;&nbsp;
      				  <a href="javascript:void(0);" onclick="delproduct(<{$store.store_cat_id}>)" >删除</a>&nbsp;&nbsp;&nbsp;&nbsp;
<!--      				  <{if $store.store_is_recommend==0}>
      				  <a href="./store.php?action=RecommendStore&store_id=<{$store.store_cat_id}>&recvalue=0" >推荐</a>&nbsp;&nbsp;&nbsp;&nbsp;
      				  <{else}>
      				   <a href="./store.php?action=RecommendStore&store_id=<{$store.store_cat_id}>&recvalue=1" >取消推荐</a>&nbsp;&nbsp;&nbsp;&nbsp;
      				   <{/if}>-->
      				  <a onclick="store_link_product('./store.php?action=SProductlist&store_id=<{$store.store_cat_id}>')">添加产品</a>&nbsp;&nbsp;&nbsp;&nbsp;
<!--      				  <a href="./store.php?action=ManageProduct&store_id=<{$store.store_cat_id}>">管理产品</a>-->
      				  </td>
    </tr>
    <{/foreach}>
  </table>
  <{/if}>
</form>
</body>
</html>
